package day02;

public class VarDemo3 {
    public static void main(String[] args) {
        int a=5;
        int b=3;
        int c=a+b; // 8
        System.out.println(c);
        c=a-b;// 2
        System.out.println(c);
        c=a*b; //15
        System.out.println(c);
        c=a/b;// 1
        System.out.println(c);//
        c=a%b;// 2
        System.out.println(c);

        double e=3.14;
        double f=4.0;
        double share = e*f*f;
        System.out.println(share);

        double g=11;
        double h=g/f;
        System.out.println(h);// 2.75
        h = g%f;
        System.out.println(h);//
        h=11/4;// 11 4 默认是int 类型的，所有只有整数部分
        System.out.println(h);//2.0
        h=11%4;
        System.out.println(h);//3.0
        h=11.0/4;// 11.0 是double类型，4 是int类型，运算中，int会自动转换大类型的double
        System.out.println(h);//2.75
        c= (int) (11.0/4);
        System.out.println(c);


        short s1=3;
        short s2=2;
        short s3= (short) (s1+s2);
        System.out.println(s3);
      /*  s3=s1+1;
        System.out.println(s3);*/
        s3 +=s1;//
        System.out.println(s3);
        s3 = (short) (s1+s3);
        System.out.println(s3);



























    }
}
